package tp.pr2.mv.command;

import tp.pr2.mv.command.step.*;
import tp.pr2.mv.command.debug.*;

public class CommandParser {

		private static CommandInterpreter[] commands = new CommandInterpreter[]{
			new Step(),
			new Steps(),
			new Run(),
			new Quit(),
			new DbgPush(),
			new DbgPop(),
			new DbgWrite(),
		};
	
	public static CommandInterpreter parseCommand(String line){
		CommandInterpreter anyCommand2 = null; 
		for (CommandInterpreter anyCommand : commands)
			if (anyCommand2 == null)
				anyCommand2 = anyCommand.parse(line);
		
	return anyCommand2;
	}

}
